12. Form Requests and Redirects

Form Requests and Redirects

You can find the code for this exercise here.

Errata: If you've been following along with your own code, you'll need to make sure to add a link to the menu.html file to actually get to the new menu item page. Remember that the restaurant object has been passed into the template, so we have access to its details.

<a href = '{{url_for('newMenuItem', restaurant_id = restaurant.id) }}'>
Create New Item</a>